package com.heima.apis.wemedia;

import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.ChannelDto;
import com.heima.model.wemedia.dtos.NewsAuthDto;
import com.heima.model.wemedia.dtos.SensitiveDto;
import com.heima.model.wemedia.pojos.WmChannel;
import com.heima.model.wemedia.pojos.WmSensitive;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = "leadnews-wemedia")
public interface IWemediaClient {

    @PostMapping("/api/v1/feign/wemedia/channel/save")
    public ResponseResult insertChannle(@RequestBody WmChannel wmChannel);

    @PostMapping("/api/v1/feign/wemedia/channel/findAll")
    public ResponseResult findAllChannel();

    @PostMapping("/api/v1/feign/wemedia/channel/list")
    public PageResponseResult findChannelList(@RequestBody ChannelDto dto);

    @PostMapping("/api/v1/feign/wemedia/channel/update")
    public ResponseResult updateChannel(@RequestBody WmChannel wmChannel);

    @GetMapping("/api/v1/feign/wemedia/channel/del/{id}")
    public ResponseResult deleteChannel(@PathVariable("id") Integer id);

    @PostMapping("/api/v1/feign/wemedia/sensitive/list")
    public PageResponseResult findSensitiveList(@RequestBody SensitiveDto dto);

    @PostMapping("/api/v1/feign/wemedia/sensitive/save")
    public ResponseResult insertSensitive(@RequestBody WmSensitive wmSensitive);

    @PostMapping("/api/v1/feign/wemedia/sensitive/update")
    public ResponseResult updateSensitive(@RequestBody WmSensitive wmSensitive);

    @GetMapping("/api/v1/feign/wemedia/sensitive/del/{id}")
    public ResponseResult deleteSensitive(@PathVariable("id") Integer id);

    @PostMapping("/api/v1/feign/news/find_list_vo")
    public PageResponseResult findListNewsVo(@RequestBody NewsAuthDto dto);

    @PostMapping("/api/v1/feign/news/find_news_vo/{id}")
    public ResponseResult findWmNewsVo(@PathVariable("id") Integer id);

    @PostMapping("/api/v1/feign/news/update_wmNews_status/{status}")
    public ResponseResult updateWmNewsStatus(@PathVariable("status") Short status ,@RequestBody NewsAuthDto dto);

    @PostMapping("/api/v1/feign/wemedia/sensitive/import")
    public void importSensitive(@RequestBody List<WmSensitive> wmSensitiveList);
}
